$fz-article: 13px;
$fz-md-article: 14px;

.article{
  font-size: $fz-article;
  background-color: white;
  .article-header{
    color: $bg-main;
    @extend .unselectable;
    text-align: center;
    display: flex;
    justify-content: flex-end;
    padding: 6px 15px;
    & > *{
      padding-left: 30px;
    }
    &:active{
      transform: translateY(2px);
    }
    .week{
      font-weight: bold;
    }
    .weather{
      img{
        display: block;
        width: 20px;
      }
    }
    .date{}
    .category{
      font-weight: bold;
    }
  }
  .article-body{
    color: $bg-main;
    padding: 0 15px;
    .title{
      font-weight: bold;
      line-height: 1.3;
      padding: 10px 0;
    }
    .content {
      padding-bottom: 12px;
      color: $bg-main;
      line-height: 1.5;
      p {
      }
    }
  }
  &.active{
    .article-header{
      color: white;
    }
  }
}

//on pc
@media (min-width: $grid-separate-width-md) {
  .article{
    font-size: $fz-md-article;
    &-header{
      justify-content: flex-end;
      padding: 8px 15px;
      & > *{
        padding-left: 30px;
      }
    }
    &-body{
      padding: 0 15px;
      .title{
      }
      .content{
        padding-bottom: 15px;
      }
    }
  }
}


@each $name, $color in $categories {
  .article-#{$name}{
    .article-header{
      border-top: 0.5px solid rgba($color, 0.3);
      background-color: rgba($color, 0.06);
    }
    .category{
      color: $color;
    }
    // 选中时的样式
    &.active{
      .article-header{
        background-color: $color;
      }
      .category{
        color: white;
      }
    }
  }
}
